/*
 *
 *  * Copyright (c) iwindplus Technologies Co., Ltd.2024-2030, All rights reserved.
 *
 *
 */

package com.iwindplus.base.binlog.domain.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

/**
 * binlog 数据传输对象.
 *
 * @author zengdegui
 * @since 2025/11/21 22:24
 */
@Schema(description = "binlog 数据传输对象")
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
public class BinlogDTO implements Serializable {

    /**
     * 操作.
     */
    @Schema(description = "操作")
    private String op;

    /**
     * 事务.
     */
    @Schema(description = "事务")
    private Object transaction;

    /**
     * 处理时间（毫秒）.
     */
    @Schema(description = "处理时间（毫秒）")
    private Long tsMs;

    /**
     * 处理时间（微秒）.
     */
    @Schema(description = "处理时间（微秒）")
    private Long tsUs;

    /**
     * 处理时间（纳秒）.
     */
    @Schema(description = "处理时间（纳秒）")
    private Long tsNs;

    /**
     * 元数据.
     */
    @Schema(description = "元数据")
    private Object source;

    /**
     * 操作前数据.
     */
    @Schema(description = "操作前数据")
    private Object before;

    /**
     * 操作后数据.
     */
    @Schema(description = "操作后数据")
    private Object after;
}
